package com.hoshiicloud.user.service.organization;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.user.entity.organization.ComOrganization;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 租户供应商 服务类
 * </p>
 *
 * @author campchen
 * @since 2019-04-28
 */
public interface ComOrganizationService extends IService<ComOrganization> {

    ComOrganization getById(Long id);

    List<ComOrganization> getByIds(List<Long> ids, String key);

    ComOrganization getByOrgcode(String orgcode);

    String insert(ComOrganization entity);

    boolean updateById(ComOrganization entity);

    boolean updateById(Long id, Integer sataus);

    Collection<ComOrganization> listByIds(Collection<? extends Serializable> idList);

    IPage<ComOrganization> getPage(IPage<ComOrganization> page, QueryWrapper<ComOrganization> queryWrapper, String key);

    boolean deleteById(Long id);

    List<ComOrganization> selectOrganizationByMemberId(@Param("memberId") Long memberId);

    List<ComOrganization> selectOrgByName(@Param("name") String name);
}
